]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
build: Disable asserts and cast checks
authorRobert Mader <robert.mader@collabora.com>
Tue, 9 Jan 2024 16:32:37 +0000 (17:32 +0100)
committerRobert Mader <robert.mader@posteo.de>
Wed, 2 Oct 2024 08:56:23 +0000 (08:56 +0000)
For non-debug and non-plain cases - i.e. mainly release builds - in
order to mirror Mutter.

One advantage of doing this is that it allows us to use non-trivial
asserts more generously, such as calling `g_list_length()`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3099>

meson.build

index 214a955c0dfc404a08cda67771df1ef581328022..0a994edbe0f91f268bcab47f0be219fc5baaa5ed 100644 (file)
@@ -225,6 +225,11 @@ if buildtype != 'plain'
     gs_c_args += [
       '-DG_ENABLE_DEBUG',
     ]
+  else
+    gs_c_args += [
+      '-DG_DISABLE_ASSERT',
+      '-DG_DISABLE_CAST_CHECKS',
+    ]
   endif
 
   supported_gs_c_args = cc.get_supported_arguments(gs_c_args)